var hasExtract=false;
function extractKey() {
    if(hasExtract==false){
        var keyWords=["美若天仙","动如脱兔","兰质蕙心","柠檬范儿","萌面超人","红包滚滚","帅破天际","萌面超人",
            "帅破天际","逗比到底","逗比到底","帅破天际","江湖传说","红包滚滚","斗鸡走狗","遍地桃花","斗破苍穹"];
        var i= 8+parseInt(9*Math.random());
        var name;
        name = prompt("请问你叫什么名字?");

        if (name == "袁汉") {
            alert("帅破天际");
            return;
        }else if(name==""){
            alert("请输入您的名字");
            return;
        }
        var sex;
        sex=prompt("您的性别呢？");
        if(sex=="女"){
            i=parseInt(8*Math.random());
        }else if(sex!="男"){
            alert("您确定您的性别是："+sex+"?");
            return;
        }

        if(keyWords[i]=="红包滚滚"){
            alert(name+"的2017关键词是："+keyWords[i]+"\n恭喜获得红包一份！");
        }
        alert(name+"的2017关键词是："+keyWords[i]);
        hasExtract=true;
    }else{
        alert("呵呵，再抽？");
    }

}